<?php


abstract class BaseTblMemberCommBackup extends BaseObject  implements Persistent {


	
	protected static $peer;


	
	protected $f_id = 0;


	
	protected $f_dist_id = 0;


	
	protected $f_from_dist_id = 0;


	
	protected $f_type;


	
	protected $f_volume_type;


	
	protected $f_cps = 0;


	
	protected $f_amount = 0;


	
	protected $f_amount2 = 0;


	
	protected $f_percent = 0;


	
	protected $f_percent2 = 0;


	
	protected $f_leg1_id;


	
	protected $f_leg1_amount = 0;


	
	protected $f_leg2_id;


	
	protected $f_leg2_amount = 0;


	
	protected $f_paired_unit;


	
	protected $f_level = 0;


	
	protected $f_status;


	
	protected $f_descr;


	
	protected $f_bonus_date;


	
	protected $f_datetime;


	
	protected $id;

	
	protected $alreadyInSave = false;

	
	protected $alreadyInValidation = false;

	
	public function getFId()
	{

		return $this->f_id;
	}

	
	public function getFDistId()
	{

		return $this->f_dist_id;
	}

	
	public function getFFromDistId()
	{

		return $this->f_from_dist_id;
	}

	
	public function getFType()
	{

		return $this->f_type;
	}

	
	public function getFVolumeType()
	{

		return $this->f_volume_type;
	}

	
	public function getFCps()
	{

		return $this->f_cps;
	}

	
	public function getFAmount()
	{

		return $this->f_amount;
	}

	
	public function getFAmount2()
	{

		return $this->f_amount2;
	}

	
	public function getFPercent()
	{

		return $this->f_percent;
	}

	
	public function getFPercent2()
	{

		return $this->f_percent2;
	}

	
	public function getFLeg1Id()
	{

		return $this->f_leg1_id;
	}

	
	public function getFLeg1Amount()
	{

		return $this->f_leg1_amount;
	}

	
	public function getFLeg2Id()
	{

		return $this->f_leg2_id;
	}

	
	public function getFLeg2Amount()
	{

		return $this->f_leg2_amount;
	}

	
	public function getFPairedUnit()
	{

		return $this->f_paired_unit;
	}

	
	public function getFLevel()
	{

		return $this->f_level;
	}

	
	public function getFStatus()
	{

		return $this->f_status;
	}

	
	public function getFDescr()
	{

		return $this->f_descr;
	}

	
	public function getFBonusDate($format = 'Y-m-d')
	{

		if ($this->f_bonus_date === null || $this->f_bonus_date === '') {
			return null;
		} elseif (!is_int($this->f_bonus_date)) {
						$ts = strtotime($this->f_bonus_date);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [f_bonus_date] as date/time value: " . var_export($this->f_bonus_date, true));
			}
		} else {
			$ts = $this->f_bonus_date;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getFDatetime($format = 'Y-m-d H:i:s')
	{

		if ($this->f_datetime === null || $this->f_datetime === '') {
			return null;
		} elseif (!is_int($this->f_datetime)) {
						$ts = strtotime($this->f_datetime);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [f_datetime] as date/time value: " . var_export($this->f_datetime, true));
			}
		} else {
			$ts = $this->f_datetime;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getId()
	{

		return $this->id;
	}

	
	public function setFId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_id !== $v || $v === 0) {
			$this->f_id = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_ID;
		}

	} 

	
	public function setFDistId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_dist_id !== $v || $v === 0) {
			$this->f_dist_id = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_DIST_ID;
		}

	} 

	
	public function setFFromDistId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_from_dist_id !== $v || $v === 0) {
			$this->f_from_dist_id = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_FROM_DIST_ID;
		}

	} 

	
	public function setFType($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_type !== $v) {
			$this->f_type = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_TYPE;
		}

	} 

	
	public function setFVolumeType($v)
	{

		if ($this->f_volume_type !== $v) {
			$this->f_volume_type = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_VOLUME_TYPE;
		}

	} 

	
	public function setFCps($v)
	{

		if ($this->f_cps !== $v || $v === 0) {
			$this->f_cps = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_CPS;
		}

	} 

	
	public function setFAmount($v)
	{

		if ($this->f_amount !== $v || $v === 0) {
			$this->f_amount = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_AMOUNT;
		}

	} 

	
	public function setFAmount2($v)
	{

		if ($this->f_amount2 !== $v || $v === 0) {
			$this->f_amount2 = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_AMOUNT2;
		}

	} 

	
	public function setFPercent($v)
	{

		if ($this->f_percent !== $v || $v === 0) {
			$this->f_percent = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_PERCENT;
		}

	} 

	
	public function setFPercent2($v)
	{

		if ($this->f_percent2 !== $v || $v === 0) {
			$this->f_percent2 = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_PERCENT2;
		}

	} 

	
	public function setFLeg1Id($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_leg1_id !== $v) {
			$this->f_leg1_id = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_LEG1_ID;
		}

	} 

	
	public function setFLeg1Amount($v)
	{

		if ($this->f_leg1_amount !== $v || $v === 0) {
			$this->f_leg1_amount = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_LEG1_AMOUNT;
		}

	} 

	
	public function setFLeg2Id($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_leg2_id !== $v) {
			$this->f_leg2_id = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_LEG2_ID;
		}

	} 

	
	public function setFLeg2Amount($v)
	{

		if ($this->f_leg2_amount !== $v || $v === 0) {
			$this->f_leg2_amount = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_LEG2_AMOUNT;
		}

	} 

	
	public function setFPairedUnit($v)
	{

		if ($this->f_paired_unit !== $v) {
			$this->f_paired_unit = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_PAIRED_UNIT;
		}

	} 

	
	public function setFLevel($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_level !== $v || $v === 0) {
			$this->f_level = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_LEVEL;
		}

	} 

	
	public function setFStatus($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_status !== $v) {
			$this->f_status = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_STATUS;
		}

	} 

	
	public function setFDescr($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_descr !== $v) {
			$this->f_descr = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_DESCR;
		}

	} 

	
	public function setFBonusDate($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [f_bonus_date] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->f_bonus_date !== $ts) {
			$this->f_bonus_date = $ts;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_BONUS_DATE;
		}

	} 

	
	public function setFDatetime($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [f_datetime] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->f_datetime !== $ts) {
			$this->f_datetime = $ts;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::F_DATETIME;
		}

	} 

	
	public function setId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->id !== $v) {
			$this->id = $v;
			$this->modifiedColumns[] = TblMemberCommBackupPeer::ID;
		}

	} 

	
	public function hydrate(ResultSet $rs, $startcol = 1)
	{
		try {

			$this->f_id = $rs->getInt($startcol + 0);

			$this->f_dist_id = $rs->getInt($startcol + 1);

			$this->f_from_dist_id = $rs->getInt($startcol + 2);

			$this->f_type = $rs->getString($startcol + 3);

			$this->f_volume_type = $rs->getFloat($startcol + 4);

			$this->f_cps = $rs->getFloat($startcol + 5);

			$this->f_amount = $rs->getFloat($startcol + 6);

			$this->f_amount2 = $rs->getFloat($startcol + 7);

			$this->f_percent = $rs->getFloat($startcol + 8);

			$this->f_percent2 = $rs->getFloat($startcol + 9);

			$this->f_leg1_id = $rs->getInt($startcol + 10);

			$this->f_leg1_amount = $rs->getFloat($startcol + 11);

			$this->f_leg2_id = $rs->getInt($startcol + 12);

			$this->f_leg2_amount = $rs->getFloat($startcol + 13);

			$this->f_paired_unit = $rs->getFloat($startcol + 14);

			$this->f_level = $rs->getInt($startcol + 15);

			$this->f_status = $rs->getString($startcol + 16);

			$this->f_descr = $rs->getString($startcol + 17);

			$this->f_bonus_date = $rs->getDate($startcol + 18, null);

			$this->f_datetime = $rs->getTimestamp($startcol + 19, null);

			$this->id = $rs->getInt($startcol + 20);

			$this->resetModified();

			$this->setNew(false);

						return $startcol + 21; 
		} catch (Exception $e) {
			throw new PropelException("Error populating TblMemberCommBackup object", $e);
		}
	}

	
	public function delete($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("This object has already been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(TblMemberCommBackupPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			TblMemberCommBackupPeer::doDelete($this, $con);
			$this->setDeleted(true);
			$con->commit();
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public function save($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("You cannot save an object that has been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(TblMemberCommBackupPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			$affectedRows = $this->doSave($con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	protected function doSave($con)
	{
		$affectedRows = 0; 
		if (!$this->alreadyInSave) {
			$this->alreadyInSave = true;


			
			if ($this->isModified()) {
				if ($this->isNew()) {
					$pk = TblMemberCommBackupPeer::doInsert($this, $con);
					$affectedRows += 1; 
										 
										 

					$this->setId($pk);  

					$this->setNew(false);
				} else {
					$affectedRows += TblMemberCommBackupPeer::doUpdate($this, $con);
				}
				$this->resetModified(); 
			}

			$this->alreadyInSave = false;
		}
		return $affectedRows;
	} 

	
	protected $validationFailures = array();

	
	public function getValidationFailures()
	{
		return $this->validationFailures;
	}

	
	public function validate($columns = null)
	{
		$res = $this->doValidate($columns);
		if ($res === true) {
			$this->validationFailures = array();
			return true;
		} else {
			$this->validationFailures = $res;
			return false;
		}
	}

	
	protected function doValidate($columns = null)
	{
		if (!$this->alreadyInValidation) {
			$this->alreadyInValidation = true;
			$retval = null;

			$failureMap = array();


			if (($retval = TblMemberCommBackupPeer::doValidate($this, $columns)) !== true) {
				$failureMap = array_merge($failureMap, $retval);
			}



			$this->alreadyInValidation = false;
		}

		return (!empty($failureMap) ? $failureMap : true);
	}

	
	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = TblMemberCommBackupPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->getByPosition($pos);
	}

	
	public function getByPosition($pos)
	{
		switch($pos) {
			case 0:
				return $this->getFId();
				break;
			case 1:
				return $this->getFDistId();
				break;
			case 2:
				return $this->getFFromDistId();
				break;
			case 3:
				return $this->getFType();
				break;
			case 4:
				return $this->getFVolumeType();
				break;
			case 5:
				return $this->getFCps();
				break;
			case 6:
				return $this->getFAmount();
				break;
			case 7:
				return $this->getFAmount2();
				break;
			case 8:
				return $this->getFPercent();
				break;
			case 9:
				return $this->getFPercent2();
				break;
			case 10:
				return $this->getFLeg1Id();
				break;
			case 11:
				return $this->getFLeg1Amount();
				break;
			case 12:
				return $this->getFLeg2Id();
				break;
			case 13:
				return $this->getFLeg2Amount();
				break;
			case 14:
				return $this->getFPairedUnit();
				break;
			case 15:
				return $this->getFLevel();
				break;
			case 16:
				return $this->getFStatus();
				break;
			case 17:
				return $this->getFDescr();
				break;
			case 18:
				return $this->getFBonusDate();
				break;
			case 19:
				return $this->getFDatetime();
				break;
			case 20:
				return $this->getId();
				break;
			default:
				return null;
				break;
		} 	}

	
	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = TblMemberCommBackupPeer::getFieldNames($keyType);
		$result = array(
			$keys[0] => $this->getFId(),
			$keys[1] => $this->getFDistId(),
			$keys[2] => $this->getFFromDistId(),
			$keys[3] => $this->getFType(),
			$keys[4] => $this->getFVolumeType(),
			$keys[5] => $this->getFCps(),
			$keys[6] => $this->getFAmount(),
			$keys[7] => $this->getFAmount2(),
			$keys[8] => $this->getFPercent(),
			$keys[9] => $this->getFPercent2(),
			$keys[10] => $this->getFLeg1Id(),
			$keys[11] => $this->getFLeg1Amount(),
			$keys[12] => $this->getFLeg2Id(),
			$keys[13] => $this->getFLeg2Amount(),
			$keys[14] => $this->getFPairedUnit(),
			$keys[15] => $this->getFLevel(),
			$keys[16] => $this->getFStatus(),
			$keys[17] => $this->getFDescr(),
			$keys[18] => $this->getFBonusDate(),
			$keys[19] => $this->getFDatetime(),
			$keys[20] => $this->getId(),
		);
		return $result;
	}

	
	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = TblMemberCommBackupPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->setByPosition($pos, $value);
	}

	
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setFId($value);
				break;
			case 1:
				$this->setFDistId($value);
				break;
			case 2:
				$this->setFFromDistId($value);
				break;
			case 3:
				$this->setFType($value);
				break;
			case 4:
				$this->setFVolumeType($value);
				break;
			case 5:
				$this->setFCps($value);
				break;
			case 6:
				$this->setFAmount($value);
				break;
			case 7:
				$this->setFAmount2($value);
				break;
			case 8:
				$this->setFPercent($value);
				break;
			case 9:
				$this->setFPercent2($value);
				break;
			case 10:
				$this->setFLeg1Id($value);
				break;
			case 11:
				$this->setFLeg1Amount($value);
				break;
			case 12:
				$this->setFLeg2Id($value);
				break;
			case 13:
				$this->setFLeg2Amount($value);
				break;
			case 14:
				$this->setFPairedUnit($value);
				break;
			case 15:
				$this->setFLevel($value);
				break;
			case 16:
				$this->setFStatus($value);
				break;
			case 17:
				$this->setFDescr($value);
				break;
			case 18:
				$this->setFBonusDate($value);
				break;
			case 19:
				$this->setFDatetime($value);
				break;
			case 20:
				$this->setId($value);
				break;
		} 	}

	
	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = TblMemberCommBackupPeer::getFieldNames($keyType);

		if (array_key_exists($keys[0], $arr)) $this->setFId($arr[$keys[0]]);
		if (array_key_exists($keys[1], $arr)) $this->setFDistId($arr[$keys[1]]);
		if (array_key_exists($keys[2], $arr)) $this->setFFromDistId($arr[$keys[2]]);
		if (array_key_exists($keys[3], $arr)) $this->setFType($arr[$keys[3]]);
		if (array_key_exists($keys[4], $arr)) $this->setFVolumeType($arr[$keys[4]]);
		if (array_key_exists($keys[5], $arr)) $this->setFCps($arr[$keys[5]]);
		if (array_key_exists($keys[6], $arr)) $this->setFAmount($arr[$keys[6]]);
		if (array_key_exists($keys[7], $arr)) $this->setFAmount2($arr[$keys[7]]);
		if (array_key_exists($keys[8], $arr)) $this->setFPercent($arr[$keys[8]]);
		if (array_key_exists($keys[9], $arr)) $this->setFPercent2($arr[$keys[9]]);
		if (array_key_exists($keys[10], $arr)) $this->setFLeg1Id($arr[$keys[10]]);
		if (array_key_exists($keys[11], $arr)) $this->setFLeg1Amount($arr[$keys[11]]);
		if (array_key_exists($keys[12], $arr)) $this->setFLeg2Id($arr[$keys[12]]);
		if (array_key_exists($keys[13], $arr)) $this->setFLeg2Amount($arr[$keys[13]]);
		if (array_key_exists($keys[14], $arr)) $this->setFPairedUnit($arr[$keys[14]]);
		if (array_key_exists($keys[15], $arr)) $this->setFLevel($arr[$keys[15]]);
		if (array_key_exists($keys[16], $arr)) $this->setFStatus($arr[$keys[16]]);
		if (array_key_exists($keys[17], $arr)) $this->setFDescr($arr[$keys[17]]);
		if (array_key_exists($keys[18], $arr)) $this->setFBonusDate($arr[$keys[18]]);
		if (array_key_exists($keys[19], $arr)) $this->setFDatetime($arr[$keys[19]]);
		if (array_key_exists($keys[20], $arr)) $this->setId($arr[$keys[20]]);
	}

	
	public function buildCriteria()
	{
		$criteria = new Criteria(TblMemberCommBackupPeer::DATABASE_NAME);

		if ($this->isColumnModified(TblMemberCommBackupPeer::F_ID)) $criteria->add(TblMemberCommBackupPeer::F_ID, $this->f_id);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_DIST_ID)) $criteria->add(TblMemberCommBackupPeer::F_DIST_ID, $this->f_dist_id);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_FROM_DIST_ID)) $criteria->add(TblMemberCommBackupPeer::F_FROM_DIST_ID, $this->f_from_dist_id);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_TYPE)) $criteria->add(TblMemberCommBackupPeer::F_TYPE, $this->f_type);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_VOLUME_TYPE)) $criteria->add(TblMemberCommBackupPeer::F_VOLUME_TYPE, $this->f_volume_type);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_CPS)) $criteria->add(TblMemberCommBackupPeer::F_CPS, $this->f_cps);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_AMOUNT)) $criteria->add(TblMemberCommBackupPeer::F_AMOUNT, $this->f_amount);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_AMOUNT2)) $criteria->add(TblMemberCommBackupPeer::F_AMOUNT2, $this->f_amount2);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_PERCENT)) $criteria->add(TblMemberCommBackupPeer::F_PERCENT, $this->f_percent);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_PERCENT2)) $criteria->add(TblMemberCommBackupPeer::F_PERCENT2, $this->f_percent2);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_LEG1_ID)) $criteria->add(TblMemberCommBackupPeer::F_LEG1_ID, $this->f_leg1_id);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_LEG1_AMOUNT)) $criteria->add(TblMemberCommBackupPeer::F_LEG1_AMOUNT, $this->f_leg1_amount);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_LEG2_ID)) $criteria->add(TblMemberCommBackupPeer::F_LEG2_ID, $this->f_leg2_id);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_LEG2_AMOUNT)) $criteria->add(TblMemberCommBackupPeer::F_LEG2_AMOUNT, $this->f_leg2_amount);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_PAIRED_UNIT)) $criteria->add(TblMemberCommBackupPeer::F_PAIRED_UNIT, $this->f_paired_unit);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_LEVEL)) $criteria->add(TblMemberCommBackupPeer::F_LEVEL, $this->f_level);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_STATUS)) $criteria->add(TblMemberCommBackupPeer::F_STATUS, $this->f_status);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_DESCR)) $criteria->add(TblMemberCommBackupPeer::F_DESCR, $this->f_descr);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_BONUS_DATE)) $criteria->add(TblMemberCommBackupPeer::F_BONUS_DATE, $this->f_bonus_date);
		if ($this->isColumnModified(TblMemberCommBackupPeer::F_DATETIME)) $criteria->add(TblMemberCommBackupPeer::F_DATETIME, $this->f_datetime);
		if ($this->isColumnModified(TblMemberCommBackupPeer::ID)) $criteria->add(TblMemberCommBackupPeer::ID, $this->id);

		return $criteria;
	}

	
	public function buildPkeyCriteria()
	{
		$criteria = new Criteria(TblMemberCommBackupPeer::DATABASE_NAME);

		$criteria->add(TblMemberCommBackupPeer::ID, $this->id);

		return $criteria;
	}

	
	public function getPrimaryKey()
	{
		return $this->getId();
	}

	
	public function setPrimaryKey($key)
	{
		$this->setId($key);
	}

	
	public function copyInto($copyObj, $deepCopy = false)
	{

		$copyObj->setFId($this->f_id);

		$copyObj->setFDistId($this->f_dist_id);

		$copyObj->setFFromDistId($this->f_from_dist_id);

		$copyObj->setFType($this->f_type);

		$copyObj->setFVolumeType($this->f_volume_type);

		$copyObj->setFCps($this->f_cps);

		$copyObj->setFAmount($this->f_amount);

		$copyObj->setFAmount2($this->f_amount2);

		$copyObj->setFPercent($this->f_percent);

		$copyObj->setFPercent2($this->f_percent2);

		$copyObj->setFLeg1Id($this->f_leg1_id);

		$copyObj->setFLeg1Amount($this->f_leg1_amount);

		$copyObj->setFLeg2Id($this->f_leg2_id);

		$copyObj->setFLeg2Amount($this->f_leg2_amount);

		$copyObj->setFPairedUnit($this->f_paired_unit);

		$copyObj->setFLevel($this->f_level);

		$copyObj->setFStatus($this->f_status);

		$copyObj->setFDescr($this->f_descr);

		$copyObj->setFBonusDate($this->f_bonus_date);

		$copyObj->setFDatetime($this->f_datetime);


		$copyObj->setNew(true);

		$copyObj->setId(NULL); 

	}

	
	public function copy($deepCopy = false)
	{
		
		$clazz = get_class($this);
		$copyObj = new $clazz();
		$this->copyInto($copyObj, $deepCopy);
		return $copyObj;
	}

	
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new TblMemberCommBackupPeer();
		}
		return self::$peer;
	}

} 